package com.crop.back.vo;

import com.crop.back.common.validator.group.sys.RegisterGroup;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;

/**
 * 注册时对应的视图数据类（view object），
 * 用于接收并处理邮箱验证码注册的数据。
 */
@Data
public class EmailRegisterVo {
    @NotEmpty(message = "{sys.user.name.notEmpty}", groups = {RegisterGroup.class})
    //@Pattern(message = "{sys.user.name.format.error}", regexp = "^.*[^\\d].*$", groups = {RegisterGroup.class})
    private String userName;

    @NotEmpty(message = "{sys.user.password.notEmpty}", groups = {RegisterGroup.class})
    private String password;

    @NotEmpty(message = "{sys.user.email.notEmpty}", groups = {RegisterGroup.class})
    @Email(message = "{sys.user.email.format.error}", groups = {RegisterGroup.class})
    private String email;

    @NotEmpty(message = "{sys.user.code.notEmpty}", groups = {RegisterGroup.class})
    private String code;

    @NotEmpty(message = "{sys.user.mobile.notEmpty}", groups = {RegisterGroup.class})
    private String phone;

    @NotEmpty(message = "{sys.user.mobile.notEmpty}", groups = {RegisterGroup.class})
    private String  roleId;
} 